write results on files
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(Diversion), | intent(in), | POINTER | :: | list | ||
type(DateTime), | intent(in) | :: | time | |||
type(grid_real), | intent(in) | :: | Qin | |||
type(grid_real), | intent(in) | :: | Qout |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(Diversion), | public, | POINTER | :: | current |
SUBROUTINE OutDiversions & ! (list, time, Qin, Qout) IMPLICIT NONE !arguments with intent(in): TYPE (Diversion), POINTER, INTENT(IN) :: list !list of diversion channels TYPE (DateTime), INTENT(IN) :: time TYPE (grid_real), INTENT(IN) :: Qin TYPE (grid_real), INTENT(IN) :: Qout !local declarations: TYPE(Diversion), POINTER :: current !current diversion in the list !------------------------------end of declarations----------------------------- timeString = time current => list DO WHILE (ASSOCIATED(current)) !loop trough all diversion channels WRITE(current % fileunitOut,'(a,4(" ",e14.7))') timeString,& Qin % mat(current % r, current % c),& Qout % mat(current % r, current % c),& current % QinChannel, & current % QoutChannel current => current % next END DO RETURN END SUBROUTINE OutDiversions